﻿@model SDAU.GCT.OA.Model.UserInfo
@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Edit</title>
    <script src="~/Scripts/jquery-3.3.1.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
    <script type="text/javascript">
        function afterEdit(data) {
            if (data == "ok") {
                //此处调用父容器的方法
                window.parent.window.afterEditSuccess();
            } else {
                alert("修改失败！！");
            }
        }
        function submitForm() {
            $("form").submit();
        }
    </script>
</head>
<body>
    @using (Ajax.BeginForm(new AjaxOptions() { OnSuccess="afterEdit" }))
    {
        @Html.AntiForgeryToken()
        
    <div class="form-horizontal">
        <h4>用户信息表</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.Subtime)
        @Html.HiddenFor(model => model.ModfiedOn)
        @Html.HiddenFor(model => model.DelFlag)

        <div class="form-group">
            @Html.LabelFor(model => model.Uname, "用户名", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Uname, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Uname, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Pwd, "密码", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Pwd, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Pwd, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ShowName,"显示名", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ShowName, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ShowName, "", new { @class = "text-danger" })
            </div>
        </div>


        <div class="form-group">
            @Html.LabelFor(model => model.Remark,"备注", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Remark, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Remark, "", new { @class = "text-danger" })
            </div>
        </div>




        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="保存" class="btn btn-default" />
            </div>
        </div>
    </div>
    }
    
  
</body>
</html>
